cmake_minimum_required(VERSION 3.0.0)
project(car_voice_assistant VERSION 0.1.0 LANGUAGES C)

add_executable(car_voice_assistant main.c)
add_subdirectory(snowboy)

#add_executable(main main.c)
#target_link_libraries(main snowboy-wrapper snowboy-detect cblas m stdc++ asound curl cjson resolv uuid gpiod pthread)
#target_compile_definitions(main PRIVATE _GNU_SOURCE)

#add_executable(wake wake.c record.c stt.c token.c http.c config.c chat.c play.c tts.c)
#target_link_libraries(wake snowboy-wrapper snowboy-detect cblas m stdc++ asound curl cjson resolv uuid)
#target_compile_definitions(wake PRIVATE _GNU_SOURCE)

#add_executable(led led.c record.c stt.c token.c http.c config.c chat.c play.c tts.c)
#target_link_libraries(led snowboy-wrapper snowboy-detect cblas m stdc++ asound curl cjson resolv uuid)
#target_compile_definitions(led PRIVATE _GNU_SOURCE)

add_executable(car car.c record.c stt.c token.c http.c config.c chat.c play.c tts.c control.c)
target_link_libraries(car snowboy-wrapper snowboy-detect cblas m stdc++ asound curl cjson resolv uuid gpiod)
target_compile_definitions(car PRIVATE _GNU_SOURCE)

#add_executable(key_stt key_stt.c token.c http.c config.c record.c)
#target_compile_definitions(key_stt PRIVATE _GNU_SOURCE)
#target_link_libraries(key_stt curl cjson gpiod asound)

#add_executable(utils utils.c)
#target_link_libraries(utils uuid resolv)

#add_executable(jrsc jrsc.c play.c http.c config.c tts.c)
#target_link_libraries(jrsc asound curl cjson resolv uuid)
#target_compile_definitions(jrsc PRIVATE _GNU_SOURCE)

#add_executable(key_record key_record.c record.c)
#target_link_libraries(key_record gpiod asound)

#add_executable(key_control key_control.c control.c)
#target_link_libraries(key_control gpiod asound)